/*
 * @Author       : 邱狮杰
 * @Date         : 2021-05-20 15:27:29
 * @LastEditTime : 2021-05-20 15:38:06
 * @FilePath     : /wedding-dress-selection/src/utils/window.ts
 * @Description  : window operaction
 */

export function getQueryVariable(variable: string) {
  let query = window.location.search.substring(1)
  let vars = query.split('&')
  for (let i = 0; i < vars.length; i++) {
    let pair = vars[i].split('=')
    if (pair[0] === variable) {
      return pair[1]
    }
  }
  return false
}
